<template>
  <div class="main">
    <div class="header">
      <div class="main">
        <div class="df" style="align-items: normal">
          <div class="titleLeft">测评</div>
          <div class="titleRight curr" @click="handleGoReport">我的报告</div>
        </div>
      </div>
    </div>
    <div style="display: flex; justify-content: center">
      <iframe
        frameborder
        :src="tokenDate"
        style="width: 40%; height: 90vh; margin: 0 auto"
      ></iframe>
    </div>
  </div>
</template>
<script setup>
import { ref } from 'vue';
import { getToken } from '@/utils/auth';
import { useRouter } from 'vue-router';
import { useStore } from 'vuex';
const router = useRouter();
const store = useStore();
// chatkgaok
const tokenDate = ref(
  `${store.getters.indexInfo.h5addr}/#/pages/pcPing/myPcPing?token=${getToken()}`,
);

const handleGoReport = () => {
  router.push({
    path: '/ping',
  });
};
</script>
<style lang="scss" scoped>
.header {
  width: 100%;
  background-color: #fff;
  padding-top: 20px;
  border-bottom: 1px solid #f2f2f2;
  position: sticky;
  top: 0;
  z-index: 99;

  .titleLeft {
    border-bottom: 4px solid var(--active-text);
    padding-bottom: 10px;
    margin-right: 50px;
  }
}
</style>
